using System;
using System.Collections.Generic;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class HoaDonBUS
    {
        public void CapNhatTongTien(int MaHD, Double TongTien)
        {
            try
            {
                HoaDonDAO hdDAO = new HoaDonDAO();
                hdDAO.CapNhatTongTien(MaHD, TongTien);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public int ThemHoaDon(int MaHD, int MaKH, DateTime NgayThanhToan)
        {
            MaHD = 0;
            try
            {
                HoaDonDAO hdDAO = new HoaDonDAO();
                MaHD = hdDAO.ThemHoaDon(MaHD, MaKH, NgayThanhToan);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return MaHD;
        }
    }
}
